package com.bank.repository;

import com.bank.entity.UserInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;

public interface UserInfoRepository extends JpaRepository<UserInfo, Long> {
    @Query("SELECT u FROM UserInfo u WHERE u.pid = :keyword OR u.telephone = :keyword OR u.customerName LIKE CONCAT('%', :keyword, '%')")
    List<UserInfo> findByKeyword(@Param("keyword") String keyword);
} 